from langchain_core.tools import tool

from app.llm.ollama import chat_model


@tool
def add(a: int, b: int) -> int:
    """Adds a and b."""
    return a + b


@tool
def multiply(a: int, b: int) -> int:
    """Multiplies a and b."""
    return a * b


tools = [add, multiply]


llm_with_tools = chat_model.bind_tools(tools)
result = llm_with_tools.invoke("What is 3 * 12? Also, what is 11 + 49?")
print(result)